<?php if (!defined('THINK_PATH')) exit();?><html>
    <head>
        <title>会员列表</title>
        <link href="<?php echo (ADMIN_CSS_URL); ?>bootstrap.css" rel="stylesheet" />
        <link href="<?php echo (ADMIN_CSS_URL); ?>lz-style.css" rel="stylesheet" />
        <script src="<?php echo (ADMIN_JS_URL); ?>jquery.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>bootstrap.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/jquery.dataTables.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/dataTables.bootstrap.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>DatePicker/WdatePicker.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables').dataTable({
                    paging: true,
                    searching: false,
                    showrownumber: true
                });
            });
        </script>
    </head>
    <body>
        <div class="container">
            <div class="row div_head" >
                <div class=" col-xs-6 col-sm-6 text-primary">
                    当前位置是：会员系统>会员设置>基本信息设置>会员列表
                </div>
                <div class=" col-xs-6 col-sm-3"></div>
                <div class=" col-xs-6 col-sm-3">
                    <a style="text-decoration: none;" href="/ecs/index.php/Admin/VIP/add">【添加】</a>
                </div>
            </div>
            <hr />
            <div class="row div_form" >
                <form action="/ecs/index.php/Admin/VIP/lst" method="post">
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPLoginCode" class="control-label"><?php echo (LB_VIPLOGINCODE); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VIPLoginCode" name="VIPLoginCode" class="form-control" placeholder="<?php echo (LB_VIPLOGINCODE); ?>"  value="" maxlength="20"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPName" class="control-label"><?php echo (LB_VIPNAME); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VIPName" name="VIPName" class="form-control" placeholder="<?php echo (LB_VIPNAME); ?>"  value="" maxlength="42"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPNickName" class="control-label"><?php echo (LB_VIPNICKNAME); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VIPNickName" name="VIPNickName" class="form-control" placeholder="<?php echo (LB_VIPNICKNAME); ?>"  value="" maxlength="42"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPPhoneNo" class="control-label"><?php echo (LB_VIPPHONENO); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VIPPhoneNo" name="VIPPhoneNo" class="form-control" placeholder="<?php echo (LB_VIPPHONENO); ?>"  value="" maxlength="11"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="Sex" class="control-label"><?php echo (LB_SEX); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <select id="Sex" name="Sex" class="form-control" >
                            <option value="" style="display: none"></option>
                            <?php if(is_array($GV_Enum["Sex"])): foreach($GV_Enum["Sex"] as $k=>$row): ?><option value="<?php echo ($k); ?>"><?php echo ($k); ?>-<?php echo ($row); ?></option><?php endforeach; endif; ?>
                        </select>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="BirthDay" class="control-label"><?php echo (LB_BIRTHDAY); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="text" id="BirthDay" name="BirthDay" class="form-control Wdate" placeholder="<?php echo (LB_BIRTHDAY); ?>" onClick="WdatePicker({el: this, isShowClear: false, readOnly: true, skin: 'whyGreen', dateFmt: 'yyyy/MM/dd'})"  />
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="Mail" class="control-label"><?php echo (LB_MAIL); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="Mail" name="Mail" class="form-control" placeholder="<?php echo (LB_MAIL); ?>"  value="" maxlength="50"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPType" class="control-label"><?php echo (LB_VIPTYPE); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <select id="VIPType" name="VIPType" class="form-control" >
                            <option value="" style="display: none"></option>
                            <?php if(is_array($GV_Enum["VIPType"])): foreach($GV_Enum["VIPType"] as $k=>$row): ?><option value="<?php echo ($k); ?>"><?php echo ($k); ?>-<?php echo ($row); ?></option><?php endforeach; endif; ?>
                        </select>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VIPLevel" class="control-label"><?php echo (LB_VIPLEVEL); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <select id="VIPLevel" name="VIPLevel" class="form-control" >
                            <option value="" style="display: none"></option>
                            <?php if(is_array($GV_Enum["VIPLevel"])): foreach($GV_Enum["VIPLevel"] as $k=>$row): ?><option value="<?php echo ($k); ?>"><?php echo ($k); ?>-<?php echo ($row); ?></option><?php endforeach; endif; ?>
                        </select>
                    </div>



                    <div class="col-xs-6 col-sm-3">
                        <input type="submit" id="search"  class="btn btn-default" value="查询">
                    </div>

                </form>
                <div id="error" class="row text-danger"></div>
                <div id="success" class="row text-success"></div>
            </div>
            <hr />
            <div class="row div_content" >
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover table-condensed" id="dataTables" border="1">
                            <thead>
                                <tr>
                                    <th class="div_tab_head">序号</th>

                                    <th class="div_tab_head"><?php echo (LB_VIPNO); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPLOGINCODE); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPNAME); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPNICKNAME); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPPHONENO); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_SEX); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_BIRTHDAY); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_MAIL); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPTYPE); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPLEVEL); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPFIGTHVALUE); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VIPIMG); ?></th>

                                    <th class="div_tab_head">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($lst)): foreach($lst as $key=>$row): ?><tr>
                                    <td class="div_tab_cell"><?php echo ($key+1); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vipno"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["viplogincode"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vipname"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vipnickname"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vipphoneno"])); ?></td>

                                <?php $var_sex = $row["sex"]; ?>
                                <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($GV_Enum["Sex"]["$var_sex"])); ?></td>
                                <td class="div_tab_cell div_tab_cell_date"><?php echo ($row["birthday"]); ?></td>
                                <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["mail"])); ?></td>

                                <?php $var_viptype = $row["viptype"]; ?>
                                <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($GV_Enum["VIPType"]["$var_viptype"])); ?></td>

                                <?php $var_viplevel = $row["viplevel"]; ?>
                                <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($GV_Enum["VIPLevel"]["$var_viplevel"])); ?></td>
                                <td class="div_tab_cell div_tab_cell_num"><?php echo (stripcslashes($row["vipfigthvalue"])); ?></td>
                                <td class="div_tab_cell div_tab_cell_text">
                                    <img src="<?php echo (FILE_ROOT); echo (stripcslashes($row["vipsimg"])); ?>" height="40" width="60">
                                </td>

                                <td align="center" class="div_tab_cell"><div class="btn-group">
                                        <a id="edit" type="button" class="btn btn-default" href="/ecs/index.php/Admin/VIP/edit/VIPNo/<?php echo ($row["vipno"]); ?>"><span class="glyphicon glyphicon-pencil"></span></a>
                                        <a id="delete" type="button" class="btn btn-default"href="/ecs/index.php/Admin/VIP/del/VIPNo/<?php echo ($row["vipno"]); ?>" onClick="if (confirm('确定要删除吗？'))
                                                    return true;
                                                else
                                                    return false;"><span class="glyphicon glyphicon-remove"></span></a>
                                    </div></td>
                                </tr><?php endforeach; endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>